<ion-view class="bg">
  <ion-header-bar class="bar bar-positive">
    <button class="button back-button buttons icon ion-ios-arrow-left button-clear" nav-direction="back" ui-sref="tab.workbench">返回</button>
    <h3 class="title">搜索订单</h3>
  </ion-header-bar>
  <div class="bar bar-header item-input-inset" style="margin-top: 44px;">
    <label class="item-input-wrapper">
      <i class="icon ion-ios-search placeholder-icon"></i>
      <input type="search" placeholder="订单号" id="searchOd" ng-model="search.parameter.orderNo">
    </label>
  </div>
  <ion-content style="margin-top: 42px;">
    <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
    <div ng-if="showloading" class="ion-spinner">
      <ion-spinner icon="lines" class="spinner-calm"></ion-spinner>
    </div>
    <ion-list class="myList" ng-if="showloading == false">
      <h5 ng-if="orderData==''" class="notFound">未找到数据</h5>
      <li class="item li" ng-click="goDetail(data.ID)" ng-repeat="data in orderData">
        <div>
          <i>订单编号</i>
          <i class="value" style="color: #11c1f3">{{data.ORDER_NO}}</i>
        </div>
        <img src="img/orderState-{{data.ORDER_STATUS}}.png" class="stateImg">
        <div>
          <i>货物名称</i>
          <i class="value">{{data.GOODS_NAME}}</i>
          <i class="value">{{data.PIECES}}件</i>
        </div>
        <div>
          <i>收货人</i>
          <i class="value">{{data.CONSIGNEE_NAME}}</i>
          <i>{{data.CONSIGNEE_PHONE}}</i>
          <i style="float: right;font-size: 13px;">{{data.ORDER_DATE | date : "yyyy-MM-dd"}}</i>
        </div>
        <div class="btnDiv" ng-if="data.ORDER_STATUS=='0'">
          <div class="button button-positive longButton" ng-click="orderRevoke(data.ID);$event.stopPropagation();" style="width: 80%;">撤销</div>
        </div>
        <div class="btnDiv" ng-if="data.ORDER_STATUS=='4'">
          <div class="button button-light leftButton" ng-click="changeOrder(data.ID);$event.stopPropagation();">修改</div>
          <div class="button button-positive rightButton" ng-click="orderSubmit(data.ID);$event.stopPropagation();">提交</div>
        </div>
      </li>
    </ion-list>
  </ion-content>
</ion-view>
